Skip to content

Comments

feat: add trackTime async helper for timing sync/async functions#4

Merged
NishuGoel merged 3 commits intomainfrom
claude/slack-improve-lambda-server-timing-maPpV
Feb 21, 2026
Merged

feat: add trackTime async helper for timing sync/async functions#4
NishuGoel merged 3 commits intomainfrom
claude/slack-improve-lambda-server-timing-maPpV

Conversation

@NishuGoel
Copy link
Owner

Adds trackTime(name, fn, description?) that wraps any function and automatically records its duration as a Server-Timing metric. The function result is returned directly and errors are re-thrown after recording the timing.

Also adds comprehensive unit tests (14 tests) covering all exported functions, and @types/jest for TypeScript test support.

Adds `trackTime(name, fn, description?)` that wraps any function and
automatically records its duration as a Server-Timing metric. The
function result is returned directly and errors are re-thrown after
recording the timing.

Also adds comprehensive unit tests (14 tests) covering all exported
functions, and @types/jest for TypeScript test support.

https://claude.ai/code/session_01DzQMhbNjBJgCD2pRw4naC7
@NishuGoel NishuGoel merged commit 0679214 into main Feb 21, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants